Make alias handling more straightforward
authorAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 3 May 2018 10:50:05 +0000 (13:50 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Thu, 3 May 2018 15:29:51 +0000 (18:29 +0300)
commitd49910fd210b1732498d994abecbe6b12d8db3bb
tree6133fcd149639887c11020a18e50d27d3a5a970e
parent4dc5db2db5603b926467996ccdfc8262506a2010
Make alias handling more straightforward

Previously, `execute_subcommand` was called recursively, and each call
would `.configure` the `config` again. It worked, but seemed rather
fragile.

This commit handles aliases more explicitly, ensures that `.configure`
is called once and, as a bonus, adds a warning for when an alias is
shadowed by the built in.
src/bin/cli.rs
tests/testsuite/cargo_alias_config.rs